{template 'common/header-gw'}
{template 'extension/service-tabs'}
<style>
.table td span{display:inline-block;}
.table td input{margin-bottom:0;}
</style>
<script type="text/javascript">
$(function(){
	$('div.make-switch').on('switch-change', function (e, data) {
		var rids = [];
		$('div.make-switch :checkbox:checked').each(function(){
			rids.push($(this).val());
		});
		$.post(location.href, {'rids': rids.toString()}, function(dat){
		});
	});
});
</script>
<h5 class="page-header">常用服务接入</h5>
<form action="" method="post">
<div class="main">
	<div style="padding:15px;">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:200px;">服务名称</th>
					<th style="min-width:260px;">功能说明</th>
					<th style="width:60px;">状态</th>
				</tr>
			</thead>
			<tbody>
				{loop $ds $row}
				<tr>
					<td>{$row['title']}</td>
					<td>{$row['description']}</td>
					<td>
						<div class="make-switch" data-on-label="启用" data-off-label="停用">
							<input type="checkbox" value="{$row['rid']}"{$row['switch']} />
						</div>
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
	</div>
</div>
</form>
{template 'common/footer-gw'}
